-
Notifications
You must be signed in to change notification settings - Fork 914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support compression= in DataFrame.to_json #17634
Support compression= in DataFrame.to_json #17634
Conversation
@@ -54,6 +54,22 @@ def _get_cudf_schema_element_from_dtype( | |||
return lib_type, child_types | |||
|
|||
|
|||
def _to_plc_compression( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we use something like this in other places? If so, we could reuse it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we have something similar we use in parquet
, but given that each format supports different compression (and maps slightly differently from Python), I can take a look at this in a follow up
@@ -1453,3 +1453,12 @@ def test_chunked_json_reader(): | |||
with cudf.option_context("io.json.low_memory", True): | |||
gdf = cudf.read_json(buf, lines=True) | |||
assert_eq(df, gdf) | |||
|
|||
|
|||
@pytest.mark.parametrize("compression", ["gzip", None]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a compression_params
you could use
@pytest.mark.parametrize("compression", ["gzip", None]) | |
@pytest.mark.parametrize("compression", compression_params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I tried this originally, but it appears gzip is the only supported compression for writing json
/merge |
Description
closes #17564
Checklist